package com.ding;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class ApplicationListener 
        implements ServletContextListener {
    public void contextInitialized(ServletContextEvent cse) {
    	System.out.println("==============");
        List<SuffixModel> checkboxList = 
                new ArrayList<SuffixModel>();
        checkboxList.add(new SuffixModel("jsp",".jsp"));
        checkboxList.add(new SuffixModel("java",".java"));
        checkboxList.add(new SuffixModel("class",".class"));
        checkboxList.add(new SuffixModel("xml",".xml"));
        checkboxList.add(new SuffixModel("js",".js"));
        checkboxList.add(new SuffixModel("html",".html"));
        checkboxList.add(new SuffixModel("htm",".htm"));
        checkboxList.add(new SuffixModel("gif",".gif"));
        checkboxList.add(new SuffixModel("properties",".properties"));
        checkboxList.add(new SuffixModel("tld",".tld"));
        checkboxList.add(new SuffixModel("jar",".jar"));
        checkboxList.add(new SuffixModel("jpg",".jpg"));
        checkboxList.add(new SuffixModel("png",".png"));
        checkboxList.add(new SuffixModel("jpeg",".jpeg"));
        checkboxList.add(new SuffixModel("swf",".swf"));
        ServletContext servletContext = cse.getServletContext();
        servletContext.setAttribute("checkboxIte", checkboxList);
    }
    public void contextDestroyed(ServletContextEvent cse) {
    }
}